package com.raymond.queue.common.msg.request;

import com.raymond.queue.common.enums.CommandIdType;
import com.raymond.queue.common.msg.BaseAgreement;
import com.raymond.queue.common.msg.DefaultMessage;

/**
 * 消息生成者请求
 *
 * @author :  raymond
 * @version :  V1.0
 * @date :  2021-07-14 08:54
 */
public class ProductionMsgRequest extends DefaultMessage {
    /**
     * 主题名称
     */
    private String topic;
    /**
     * 需要存入的数据
     */
    private byte[] data;


    public byte[] getData() {
        return data;
    }

    public void setData(byte[] data) {
        this.data = data;
    }

    public ProductionMsgRequest(String topic, byte[] data, int sequenceId) {
        super(sequenceId);
        this.topic = topic;
        this.data = data;
    }

    public String getTopic() {
        return topic;
    }

    public void setTopic(String topic) {
        this.topic = topic;
    }

    @Override
    public int getCommandId() {
        return CommandIdType.PRODUCTION_REQ.getCommandId();
    }
}
